package com.college_career_system.service;

import com.alibaba.fastjson.JSONObject;
import com.college_career_system.pojo.dto.RecruitDTO;
import com.college_career_system.pojo.po.Recruit;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Empty
 * @since 2022-12-04
 */
public interface RecruitService extends IService<Recruit> {

    /**
     * 公司查看自己的招聘信息
     * @param request
     * @return
     */
    JSONObject selectRecruit(HttpServletRequest request);

    /**
     * 查看具体招聘信息
     * @param recruitId
     * @return
     */
    JSONObject selectRecruitById(int recruitId);

    /**
     * 按条件查找招聘信息
     * @param enterpriseType
     * @param recruitType
     * @param beginSalary
     * @param endSalary
     * @param location
     * @return
     */
    JSONObject selectRecruitByCondition(HttpServletRequest request, String enterpriseType, String recruitType, int beginSalary, int endSalary, String location);

    /**
     * 企业发布招聘信息
     * @param recruitDTO
     * @return
     */
    JSONObject saveRecruit(RecruitDTO recruitDTO);

    /**
     * 删除自己公司的招聘信息
     * @param request
     * @param recruitId
     * @return
     */
    JSONObject deleteRecruit(HttpServletRequest request, int recruitId);

    /**
     * 更新招聘信息
     * @param request
     * @param recruitDTO
     * @return
     */
    JSONObject updateRecruit(HttpServletRequest request, RecruitDTO recruitDTO);

}
